/**
 * Created by seeker910 on 2014/8/20.
 * @description 组件名称命名约定：继承container组件，名称以ViewPart结尾;继承control组件，名称以Part结尾
 * 底部版权 
 */
Rsd.define('Rsd.hermit.sections.CopyrightViewPart', {
    extend: 'Rsd.container.Component',
    requires: [
        'Rsd.form.Label',
        'Rsd.form.Link',
        'Rsd.control.ToolBar',
        'Rsd.control.ToolBarSeparator'
    ],
    xtype: 'copyright-view',  
     /**
     * @description 标识该组件是否允许编辑
     */
    domEditable:true,
     /**
     * @description true:表示只允许在模板中修改
     */
    editInMaster:true,
    height: 50,
    width:'100%',
    layout: {type:'hbox',align:'center'},  
    items:[
            {flex:1},
            {xtype: 'label',width: 350, style:{textAlign:'center'},label:'版权所有：',text: ''},
            {xtype: 'tbSeparator',width: 20},
            {xtype: 'label',width:220,style:{textAlign:'center'},label:'备案号：',text: ''},
            {xtype: 'tbSeparator',width: 20},
            {xtype: 'label',width: 85,style:{textAlign:'center'},text: '关于我们'},
            {xtype: 'tbSeparator',width: 20},
            {xtype: 'label',width:85,style:{textAlign:'center'},text: '网站声明'},
            {flex:1}
    ],
    /**
     * 
     * @param {*} config 
     */
    constructor: function CopyrightViewPart(config) {
        config = config || {};
        this.apply(config);
       
    },
    /**
     * {companyName:'',licenseNO:''}
     */
    loadData:function loadData(data)
    {
        var dataSource = data||this.dataSource ||{}; 
        this.dataSource = dataSource;
        this.items[1].setValue(dataSource.companyName);
        this.items[3].setValue(dataSource.licenseNO);
    }
});